-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refs #471: Introducing field clearing button. #472
Conversation
I think having the ability to clear a field is an excellent addition and the feature can be tremendously useful. A couple of thoughts. I'd want an option to disable it, both entirely for the form and as an override on a specific control. With so many buttons potentially on a page it could confuse users It can make for a very busy form on some pages (particularly on forms like on the arrays tab in the playground), and I'd struggle to sell the "clear" on the checkbox to any non technical person! My initial thoughts on the cross itself was I'd prefer it to be a little less obvious. Perhaps the cross can go red on hover and be a little less visible when the mouse isn't over it? However like many things once you get used to it, it grows on you, so perhaps it's fine as is. We also now have two crosses for clearing, this one and the one for clearing an entry in an array. Actually I think I prefer this one, but if we keep it I'd prefer it consistent and that may mean restyling the up/down/plus buttons (probably not a bad thing, they can be very big and in your face). |
After a good night of sleep, I have to agree... what the hell was I thinking :) Though we still need to expose a way to distinguish bewteen blanking and clearing (or resetting) a field value, as it strongly impacts the resultling submitted data. It's a hard problem to solve wrt UX, and this was my first attempt at tackling it, but there's obviously more work to be done. Meanwhile having an option to enable these buttons is a good idea, though that will probably involve a bunch of supplementary code. I really like the idea of having the "simplest" (if we can still use this word with this lib) possible forms. I'll spend some more time toying around with the UI today, to see if I can come with something less cluttered and invasive, something like this maybe (but prettier). |
Yes agreed :) That example is much more palatable. It isn't in your face and yet allows you an easy clear. I think the option is good. As you say sometimes we do need to distinguish between clearing and blanking ... but sometimes we also don't and confusing users in those situations doesn't help. :) |
Yes. Optional and turned off by default sounds good. I'd personally like to have fine grained access so (if I'm using it) I can choose the controls that require it, if only for checkboxes! :) Personally I like losing the square around the cross. That looks neater. But I didn't mind the focus approach at all. It makes the UI less busy when it's not an option and to my eye makes it less complicated. |
This is way too complicated. I'm gonna close this in favor of #476 which seems to nicely address the concerns we have with nullable fields. We may want to revisit the opportunity to distinguish between blanked and cleared fields in the future, where this would be a good starting point. |
is there a way clear fields for an input textfield/widgets with a button? |
Hey, I wish if we get a "Delete All" option for the array items elements!! Currently we have the option for deleting individual elements. Will it be possible to get a functionality for deleting the formData for all the items at a click? |
WiP, introducing clear buttons for fields. The blank-string-as-undefined strategy introduced by #442 brings too much trouble, eg. #471. So I'm finally working on adding clear buttons, as initially intended.
Todo
disabled
andreadonly